﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmReservaAmbiente.aspx.cs" Inherits="ddcCajamarca.Web.ReservaAmbientes.frmReservaAmbiente" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .auto-style1 {
            height: 526px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
    <table class="nav-justified">
        <tr>
            <td class="auto-style1"></td>
            <td class="auto-style1">
    <telerik:RadScheduler ID="RadScheduler1" runat="server" Culture="es-ES" DataDescriptionField="NomAmbiente" DataEndField="HoraFinEvento" DataKeyField="IdEvento" DataSourceID="SqlDataSource2" DataStartField="HoraInicioEvento" DataSubjectField="NomEvento" Height="504px" style="margin-left: 22; margin-top: 26px" Width="1239px" FirstDayOfWeek="Monday" HoursPanelTimeFormat="H:mm:ss" TimeZoneID="Morocco Standard Time" SelectedDate="2014-10-16" LastDayOfWeek="Sunday" SelectedView="MonthView">
        <Localization HeaderDay="Día" HeaderMonth="Mes" HeaderToday="Hoy" HeaderWeek="Semana" Show24Hours="Ver 24 horas..." />
        <DayView DayStartTime="07:00:00" />
        <MonthView VisibleAppointmentsPerDay="1" />
    </telerik:RadScheduler>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ddcCajamarcaContext %>" SelectCommand="SELECT Evento.*, Ambiente.NomAmbiente FROM Evento INNER JOIN Ambiente ON Evento.AmbienteId = Ambiente.IdAmbiente"></asp:SqlDataSource>
                <asp:EntityDataSource ID="EntityDataSource1" runat="server">
                </asp:EntityDataSource>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ddcCajamarcaContext %>" SelectCommand="SELECT * FROM [Evento]"></asp:SqlDataSource>
            </td>
            <td class="auto-style1"></td>
            <td class="auto-style1"></td>
        </tr>
        <tr>s
            <td colspan="4">
                <br />
            </td>
        </tr>
        <tr>
            <td colspan="4">&nbsp;</td>
        </tr>
        <tr>
            <td colspan="4">&nbsp;</td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">

    function afterRender(data) {
        if (data) {
            var text = data.message ? (data.message + " (id " + data.id + ")") : data;
            var img = "<img src='../media/ajax-loader-black.gif' />";
            dpc1.message(text, 1000, "#333333", "#fabd54", 5000); //#ff9525, #c00000
        }
    }

    function createEvent(start, end, resource) {
        var modal = new DayPilot.Modal();
        modal.top = 60;
        modal.width = 300;
        modal.opacity = 0;
        modal.border = "1px solid #d0d0d0";
        modal.closed = function () {
            if (this.result == "OK") {
                dpc1.commandCallBack('refresh');
            }
            dpc1.clearSelection();
        };

        modal.height = 250;
        modal.showUrl("New.aspx?start=" + start.toStringSortable() + "&end=" + end.toStringSortable());
    }

</script>
    <br />
</asp:Content>
